//
//  ViewController.m
//  DateSelectionView
//
//  Created by LiTengFei on 15/3/6.
//  Copyright (c) 2015年 LiTengFei. All rights reserved.
//

#import "ViewController.h"
#import "DateSelectionView.h"
@interface ViewController () <DateSelectionDelegate>

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor lightGrayColor];
    DateSelectionView * selecionView = [[DateSelectionView alloc]initWithFrame:CGRectMake(0, 100, CGRectGetWidth(self.view.frame), 71)];
    selecionView.delegate = self;
    [self.view addSubview:selecionView];



    UIDatePicker * picker = [[UIDatePicker alloc]initWithFrame:CGRectMake(0, 200, CGRectGetWidth(self.view.frame)/2, 100)];
    picker.datePickerMode = UIDatePickerModeTime;
    picker.calendar = [NSCalendar currentCalendar];
    [self.view addSubview:picker];


}
-(void)dateSelectionView:(DateSelectionView *)dateSelectionView updateSelectedDate:(NSString *)dateString updateSelectedTime:(NSString *)timeString{
    NSLog(@"%@  ==-=-=-=-=  %@",dateString,timeString);
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
